<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>第4忆库</title>
    <style>
.grid-item-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.grid-item-link:hover h2 {
    color: #007bff; /* Change to your preferred hover color */
    text-decoration: underline; /* Optional underline effect */
}
.slideshow-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  font-size: 24px;
  padding: 15px 10px;
  cursor: pointer;
  z-index: 10;
  transition: background 0.3s;
}

.slideshow-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.slideshow-nav.prev {
  left: 20px;
}

.slideshow-nav.next {
  right: 20px;
}

	.hero {
  width: 100%;
  position: relative;
}

.image-slideshow {
  position: relative;
  width: 100%;
  height: 400px; /* Adjust as needed */
  overflow: hidden;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slideshow-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
  padding: 15px;
  border-radius: 5px;
  color: white;
}

.search-bar {
  margin-top: 10px;
}

.search-bar input {
  padding: 8px;
  width: 200px;
}

.search-bar button {
  padding: 8px 15px;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}
        /* Reset and base styles */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Arial', sans-serif;
        }
        
        body {
            background-color: #f8f8f8;
            color: #333;
            line-height: 1.6;
            padding: 20px;
        }
        
        /* Header styles */
        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 40px;
        }
        
        /* Logo styling (adjusted rem) */
.logo {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-family: 'Times New Roman', serif;
  color: #8B4513;
  text-shadow: 
    2px 2px 0 #D2B48C,
    4px 4px 0 rgba(0,0,0,0.2);
  position: relative;
  display: inline-block;
  margin: 0.5rem 0 1rem; /* Reduced vertical margin */
  padding: 0.5rem 2rem; /* Reduced vertical padding (from 1rem 2rem) */
  background: linear-gradient(135deg, #F5F5DC 25%, #FAEBD7 100%);
  border: 3px double #A0522D;
  box-shadow: 
    0 8px 20px rgba(139, 69, 19, 0.3), /* Reduced shadow spread */
    inset 0 0 10px rgba(0,0,0,0.1); /* Reduced inner shadow */
  transform: rotate(-2deg);
  z-index: 100;
  line-height: 1.2; /* Tighter line height */
}

/* Adjust the decorative elements proportionally */
.logo::before {
  top: -8px; /* Reduced from -10px */
  left: -8px;
  right: -8px;
  bottom: -8px;
}

.logo::after {
  bottom: -1.5rem; /* Raised position (from -1.8rem) */
  font-size: 0.85rem; /* Smaller subtitle */
  letter-spacing: 6px; /* Tighter spacing */
}

/* Vintage navigation styling */
.vintage-nav {
  margin-top: 0.8rem;
  transform: translateX(-95px); /* Precise pixel adjustment */
}

.vintage-nav ul {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
  flex-wrap: wrap;
}

.nav-button {
  display: flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  background: #EDE4D3;
  color: #5C4033;
  text-decoration: none;
  font-family: 'SimSun', serif;
  font-size: 1rem;
  border: 1px solid #C4A484;
  border-radius: 30px;
  box-shadow: 
    2px 2px 0 #D2B48C,
    inset 0 0 5px rgba(255,255,255,0.5);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.nav-button:hover {
  background: #E0C9A6;
  transform: translateY(-2px);
  box-shadow: 
    3px 3px 0 #C4A484,
    inset 0 0 8px rgba(255,255,255,0.7);
}

.nav-button:active {
  transform: translateY(1px);
  box-shadow: 
    1px 1px 0 #C4A484,
    inset 0 0 10px rgba(0,0,0,0.1);
}

.nav-icon {
  margin-right: 0.5rem;
  font-size: 1.1rem;
  filter: sepia(70%);
}

/* Pseudo vintage elements */
.nav-button::before {
  content: "";
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.8), rgba(255,255,255,0));
  opacity: 0.3;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .vintage-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
  
  .logo {
    font-size: 2rem;
    padding: 0.8rem 1.5rem;
  }
}
        
        nav ul {
            display: flex;
            list-style: none;
        }
        
        nav ul li {
            margin-left: 30px;
        }
        
        nav ul li a {
            text-decoration: none;
            color: #333;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 14px;
            transition: color 0.3s;
        }
        
        nav ul li a:hover {
            color: #666;
        }
        
        /* Hero section */
        .hero {
            text-align: center;
            margin: 60px 0;
            padding: 20px;
        }
        
        .hero p {
            font-size: 24px;
            font-style: italic;
            color: #555;
        }
        
        hr {
            border: none;
            height: 1px;
            background-color: #ddd;
            margin: 40px 0;
        }
        
        /* Main content grid */
        .grid-container {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 30px;
            margin-top: 40px;
        }
        
        .grid-item {
            background-color: white;
            padding: 30px;
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
            transition: transform 0.3s, box-shadow 0.3s;
        }
        
        .grid-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 6px 12px rgba(0,0,0,0.15);
        }
        
        .grid-item h2 {
            margin-bottom: 20px;
            font-size: 20px;
            border-bottom: 2px solid #eee;
            padding-bottom: 10px;
        }
        
        /* Image grid for projects/posts */
        .image-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 20px;
            margin-top: 20px;
        }
        
        .image-placeholder {
            position: relative;
            overflow: hidden;
            height: 200px;
            background-color: #eee;
            transition: transform 0.3s;
        }
        
        .image-placeholder img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }
        
        .image-placeholder:hover img {
            transform: scale(1.05);
        }
        
        .image-placeholder a {
            display: block;
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
            text-decoration: none;
        }
        
        /* Button styles */
        .btn {
            display: inline-block;
            padding: 10px 20px;
            background-color: #333;
            color: white;
            text-decoration: none;
            margin-top: 20px;
            transition: background-color 0.3s;
        }
        
        .btn:hover {
            background-color: #555;
        }
        
        /* Footer */
        footer {
            text-align: center;
            margin-top: 60px;
            padding: 20px;
            color: #777;
            font-size: 14px;
        }
    </style>
</head>
<body>

  <header style="text-align: center; padding: 0.1rem 0 0rem; background: #F8F4E9; position: relative; border-bottom: 1px solid #E8D9C5; margin-top: 0;">
  <div class="logo">第4忆库</div>
  <nav class="vintage-nav">
    <ul>
      <li><a href="vintage-objects.html" class="nav-button"><span class="nav-icon">📜</span>收藏集</a></li>
      <li><a href="about_page.html" class="nav-button"><span class="nav-icon">ℹ️</span>关于</a></li>
      <li><a href="contact.html" class="nav-button"><span class="nav-icon">✉️</span>联系</a></li>
    </ul>
  </nav>
</header>
    
    <div class="hero">
  <div class="image-slideshow">
    <!-- Dynamic images will be inserted here by JavaScript -->
    <div class="slide active">
      <img src="images/老借书卡.png" alt="30年前学生借书卡">
    </div>
    <!-- Additional slides will be added here -->
    <div class="slide">
      <img src="images/运动奖牌.jpg" alt="老运动会奖牌">
    </div>
<div class="slide">
      <img src="images/自行车牌2.jpg" alt="老自行车牌">
    </div>
<div class="slide">
      <img src="images/英语教材.jpg" alt="老版英语教材">
    </div>

 <!-- Add these navigation buttons -->
  <button class="slideshow-nav prev">‹</button>
  <button class="slideshow-nav next">›</button>

   
    </div>
  </div>
</div>
    
    <hr>
<div class="grid-container">  
    <div class="grid-item">
    <a href="vintage-objects.html" class="grid-item-link">
        <h2>老物件收集</h2>
    </a>
    <div class="image-grid">
        <div class="image-placeholder">
            <a href="vintage-objects.html" target="_blank"><img src="images/篮球服.jpg" alt="篮球服"></a>
        </div></a>
        <div class="image-placeholder">
            <a href="vintage-objects.html" target="_blank"><img src="images/mail cover.jpeg" alt="录取邮件封"></a>
        </div></a>
        <div class="image-placeholder">
            <a href="vintage-objects.html" target="_blank"><img src="images/校歌.jpg" alt="校歌谱子"></a>
      </div>
    </div>
</div>
        
        <div class="grid-item">
		<a href="learning-experience.html" class="grid-item-link">
            <h2>口述史&校友文选</h2>
		</a>
            <div class="image-grid">
                <!-- Project image placeholders - replace with your own images -->
                <div class="image-placeholder">
                    <a href="learning-experience.html" target="_blank"><img src="images/接力.png" alt="Project 1"></a>
                </div>
                <div class="image-placeholder">
                    <a href="learning-experience.html" target="_blank"><img src="images/划船.png" alt="Project 2"></a>
                </div>
                <div class="image-placeholder">
                    <a href="learning-experience.html" target="_blank"><img src="images/跳高.png" alt="Project 3"></a>
                </div>
            </div>
        </div>
        
        <div class="grid-item">
            <a href="国际部.html" class="grid-item-link">
            <h2>国际部</h2>
		</a>
            <div class="image-grid">
                <!-- Blog post image placeholders - replace with your own images -->
                <div class="image-placeholder">
                    <a href="#" target="_blank"><img src="post1.jpg" alt="Post 1"></a>
                </div>
                <div class="image-placeholder">
                    <a href="#" target="_blank"><img src="post2.jpg" alt="Post 2"></a>
                </div>
                <div class="image-placeholder">
                    <a href="#" target="_blank"><img src="post3.jpg" alt="Post 3"></a>
                </div>
            </div>
        </div>
        
        <div class="grid-item">
            <p>有意分享您的老物件和校园回忆？欢迎联系我们！</p>
            <a href="contact.html" class="btn">建立联系</a>
        </div>
    </div>
</div>
    
    <footer>
        <p>&copy; 2025 第4忆库. All rights reserved.</p>
    </footer>
<script>
document.addEventListener('DOMContentLoaded', function() {
  const slides = document.querySelectorAll('.slide');
  const prevBtn = document.querySelector('.slideshow-nav.prev');
  const nextBtn = document.querySelector('.slideshow-nav.next');
  let currentSlide = 0;
  let slideshowInterval;

  function showSlide(index) {
    // Hide all slides
    slides.forEach(slide => slide.classList.remove('active'));
    
    // Show the selected slide
    currentSlide = (index + slides.length) % slides.length; // Handle wrap-around
    slides[currentSlide].classList.add('active');
  }

  function nextSlide() {
    showSlide(currentSlide + 1);
  }

  function prevSlide() {
    showSlide(currentSlide - 1);
  }

  function startSlideshow() {
    stopSlideshow();
    slideshowInterval = setInterval(nextSlide, 5000);
  }

  function stopSlideshow() {
    if (slideshowInterval) {
      clearInterval(slideshowInterval);
    }
  }

  // Event listeners
  nextBtn.addEventListener('click', function() {
    nextSlide();
    startSlideshow(); // Reset timer after manual navigation
  });

  prevBtn.addEventListener('click', function() {
    prevSlide();
    startSlideshow(); // Reset timer after manual navigation
  });

  // Pause on hover
  const slideshow = document.querySelector('.image-slideshow');
  slideshow.addEventListener('mouseenter', stopSlideshow);
  slideshow.addEventListener('mouseleave', startSlideshow);

  // Start the slideshow
  startSlideshow();
});
</script>
</body>
</html>